package com.zt.teacher.controller;

import com.zt.common.pojo.common.JsonResult;
import com.zt.teacher.service.SignInService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * description:
 * author:zt
 * date:2022-02-20
 */
@RestController
@CrossOrigin
@RequestMapping("signIn")
@Api("签到模块")
public class SignInController {

    @Autowired
    private SignInService signInService;

    @GetMapping("getSummary/{classId}")
    @ApiOperation("获取指定班级发布的签到次数")
    public JsonResult<Integer> getSummaryByClassId(@PathVariable int classId){
        return JsonResult.success(signInService.getSummary(classId));
    }
}
